package com.google.gwt.gfx.client.graphics;

import java.util.List;

import com.google.gwt.gfx.client.shared.DoubleControlPoint;
import com.google.gwt.gfx.client.shared.Point;
import com.google.gwt.gfx.client.style.FillStyle;
import com.google.gwt.gfx.client.style.StrokeStyle;
import com.google.gwt.user.client.Element;

public abstract class Path extends SimpleGraphic {

	public static Path get() {
		return GraphicFactory.DEFAULT.createPath();
	}

	private FillStyle fillRef;

	private StrokeStyle strokeRef;

	protected Path(Element element) {
		super(element);

		fillRef = GraphicFactory.DEFAULT.createFillOf(this);
		strokeRef = GraphicFactory.DEFAULT.createStrokeOf(this);
	}

	public abstract void close();

	public abstract void curveTo(List<DoubleControlPoint> cpoints);

	public FillStyle fill() {
		return fillRef;
	}

	public abstract void lineTo(List<Point> points);

	public abstract void moveTo(int left, int top);

	public abstract void smoothQuadCurveTo(List<Point> points);

	public StrokeStyle stroke() {
		return strokeRef;
	}

}
